package cn.smarttoo.web;

import org.nutz.dao.Dao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.HashMap;
import java.util.Map;

@Controller
public class CustomController {

    @Autowired
    Dao dao;

    @RequestMapping("/")
    @ResponseBody
    public Object index(){
        System.out.println("test dao query size is :" + dao.query("dt_component",null).size());
        Map<String,String> result  = new HashMap();

        result.put("name","dengwubo");
        result.put("age","23");

        return result;
    }


}
